package com.panshi.controller;

import com.panshi.pojo.Seckill;
import com.panshi.service.impl.SeckillServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class SeckillController {
    @Autowired
    SeckillServiceImpl seckillService;

    @RequestMapping("/seckill")
    public String seckill(Model model) {
        List<Seckill> seckillAll = seckillService.getSeckillAll();
        System.out.println(seckillAll);
        model.addAttribute("seckillAll", seckillAll);
        return "/emp/seckill";
    }
}
